package com.bdqn.vueboot.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 球场预定
 * @TableName booking
 */
@TableName(value ="booking")
@Data
public class Booking implements Serializable {
    /**
     * 球场预定id
     */
    @TableId
    private Long bookingId;

    /**
     * 球场名称Id
     */
    private String bookingNameid;

    /**
     * 预定人
     */
    private String bookingUsrid;

    /**
     * 联系人电话
     */
    private String bookingPhone;

    /**
     * 开始时间
     */
    private Date bookingStartdata;

    /**
     * 结束时间
     */
    private Date bookingStopdata;

    /**
     * 费用
     */
    private Double bookingCost;

    /**
     * 已交费用
     */
    private Double bookingCostpaid;

    /**
     * 收费状态
     */
    private Long bookingStaticcostid;

    /**
     * 处理状态
     */
    private Long bookingStaticid;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long creationId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    /**
     * 修改者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateId;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Booking other = (Booking) that;
        return (this.getBookingId() == null ? other.getBookingId() == null : this.getBookingId().equals(other.getBookingId()))
            && (this.getBookingNameid() == null ? other.getBookingNameid() == null : this.getBookingNameid().equals(other.getBookingNameid()))
            && (this.getBookingUsrid() == null ? other.getBookingUsrid() == null : this.getBookingUsrid().equals(other.getBookingUsrid()))
            && (this.getBookingPhone() == null ? other.getBookingPhone() == null : this.getBookingPhone().equals(other.getBookingPhone()))
            && (this.getBookingStartdata() == null ? other.getBookingStartdata() == null : this.getBookingStartdata().equals(other.getBookingStartdata()))
            && (this.getBookingStopdata() == null ? other.getBookingStopdata() == null : this.getBookingStopdata().equals(other.getBookingStopdata()))
            && (this.getBookingCost() == null ? other.getBookingCost() == null : this.getBookingCost().equals(other.getBookingCost()))
            && (this.getBookingCostpaid() == null ? other.getBookingCostpaid() == null : this.getBookingCostpaid().equals(other.getBookingCostpaid()))
            && (this.getBookingStaticcostid() == null ? other.getBookingStaticcostid() == null : this.getBookingStaticcostid().equals(other.getBookingStaticcostid()))
            && (this.getBookingStaticid() == null ? other.getBookingStaticid() == null : this.getBookingStaticid().equals(other.getBookingStaticid()))
            && (this.getCreationId() == null ? other.getCreationId() == null : this.getCreationId().equals(other.getCreationId()))
            && (this.getCreationTime() == null ? other.getCreationTime() == null : this.getCreationTime().equals(other.getCreationTime()))
            && (this.getUpdateId() == null ? other.getUpdateId() == null : this.getUpdateId().equals(other.getUpdateId()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBookingId() == null) ? 0 : getBookingId().hashCode());
        result = prime * result + ((getBookingNameid() == null) ? 0 : getBookingNameid().hashCode());
        result = prime * result + ((getBookingUsrid() == null) ? 0 : getBookingUsrid().hashCode());
        result = prime * result + ((getBookingPhone() == null) ? 0 : getBookingPhone().hashCode());
        result = prime * result + ((getBookingStartdata() == null) ? 0 : getBookingStartdata().hashCode());
        result = prime * result + ((getBookingStopdata() == null) ? 0 : getBookingStopdata().hashCode());
        result = prime * result + ((getBookingCost() == null) ? 0 : getBookingCost().hashCode());
        result = prime * result + ((getBookingCostpaid() == null) ? 0 : getBookingCostpaid().hashCode());
        result = prime * result + ((getBookingStaticcostid() == null) ? 0 : getBookingStaticcostid().hashCode());
        result = prime * result + ((getBookingStaticid() == null) ? 0 : getBookingStaticid().hashCode());
        result = prime * result + ((getCreationId() == null) ? 0 : getCreationId().hashCode());
        result = prime * result + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
        result = prime * result + ((getUpdateId() == null) ? 0 : getUpdateId().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bookingId=").append(bookingId);
        sb.append(", bookingNameid=").append(bookingNameid);
        sb.append(", bookingUsrid=").append(bookingUsrid);
        sb.append(", bookingPhone=").append(bookingPhone);
        sb.append(", bookingStartdata=").append(bookingStartdata);
        sb.append(", bookingStopdata=").append(bookingStopdata);
        sb.append(", bookingCost=").append(bookingCost);
        sb.append(", bookingCostpaid=").append(bookingCostpaid);
        sb.append(", bookingStaticcostid=").append(bookingStaticcostid);
        sb.append(", bookingStaticid=").append(bookingStaticid);
        sb.append(", creationId=").append(creationId);
        sb.append(", creationTime=").append(creationTime);
        sb.append(", updateId=").append(updateId);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
